package com.java.jvm.demo.chapter01;

/**
 * @author wangning
 * @create 2021-10-12 20:54
 */
public class ClinitTest1 {
	static class Father {
		public static int A = 1;
		static {
			A = 2;
		}
	}

	static class Son extends Father {
		public static int B = A;
	}

	public static void main(String[] args) {
		//加载Father类，然后加载Son类
		System.out.println(Son.B);//2
	}

}
